@rem This batch file creates the swagme zip file.  
@rem
@rem NOTE: This script requires winrar to be installed at d:\program files\winrar\
@rem       or for rar.exe to be in your PATH environment variable.
@rem 
@rem The script takes one optional argument: the build type.  If unspecified, 
@rem it defaults to "debug".  For instance:
@rem
@rem package release
@rem
@rem The above will package the release executable into the zip file.

@if "%1" == "" goto setdefaults
@set build=%1

:invoke
@set PATH=%PATH%;C:\program files\winrar\

del /q swagme.zip

copy /y %build%\swagme.exe .

rar a swagme.zip ..\*.dll swagme.exe
rar a -r swagme.zip ..\resources\wad.xml
rar a -r swagme.zip ..\resources\fonts\*.ttf
rar a -r swagme.zip ..\resources\graphics\*.png
rar a -r swagme.zip ..\resources\music\
rar a -r swagme.zip ..\resources\sounds\*.wav

del /q swagme.exe
@goto done

:setdefaults
@set build=debug
@goto invoke

:done
